<!DOCTYPE html>
<html lang='en'>
<head>
  <meta charset='UTF-8'>
  <title>Title</title>
  <link rel="stylesheet" href="../../../lib/bootstrap/3.3.5/css/bootstrap.min.css"/>
</head>
<body>
<div id="res">
  <itemlist  :mode="mode" :items="items" :on-edit="onEdit" :on-remove="onRemove" :pagenum="pagenum" ></itemlist>
</div>
<template id='itemlist-tpl' class='container-fluid'>
  <div class='table-responsive col-sm-12'>
    <ul class='media-list row contacts-container'></ul>
    <div class='col-md-11'>
      <div class='form-group form-inline pull-right'>
        <label>页面记录数：</label>
        <select id='pagenum' v-model='pagenum' class='form-control'>
          <option value='15' selected>15</option>
          <option value='20'>20</option>
          <option value='30'>30</option>
        </select>
        <button class='btn btn-default' v-on:click='onPagenum()'>确定</button>
      </div>
    </div>
    <table class="table table-bordered table-condensed table-striped" style="word-break:break-all">
      <br/>
      <thead>
      <tr class="info">
        <th>选择</th>
        <th>唯一标识</th>
        <th>负责人</th>
        <th>描述</th>
        <th>截止期</th>
        <th>状态</th>
        <th>操作</th>
      </tr>
      </thead>
      <tbody>
      <tr v-for="item in items">
        <td><input type="checkbox" v-model="item.selected"></td>
        <td width="18%"><a href="#" v-on:click="onDetailsItem('modeDetails',item)"> {{item.id}} </a></td>
        <td width="5%">{{item.principal}}</td>
        <td width="50%">{{item.description}}</td>
        <td width="12%">{{item.deadline}}</td>
        <td v-if="item.state==0">未完成</td>
        <td v-if="item.state==1" >执行中</td>
        <td v-if="item.state==9">已完成</td>
        <td>
          <a href="#" v-on:click="onRemoveItem(item,$event)"> 删除 </a> |
          <a href="#" v-on:click="onEditItem(item,$event)"> 编辑 </a>
        </td>
      </tr>
      </tbody>
    </table>
  </div>
  <div id='paging' align='center'></div>
</template>
<script src='../../../lib/jquery/2.1.4/jquery-2.1.4.min.js'></script>
<script src='../../../lib/layPage/laypage.js'></script>
<script src='../../../lib/bootstrap/3.3.5/js/bootstrap.min.js'></script>
<script src='../../../node_modules/vue/dist/vue.js'></script>
<script src='../../../lib/vue-resource/0.7.0/vue-resource.js'></script>
<script src="list.js">
</script>
</body>
</html>

